package com.conception.designpattern.strategy;

public class LoggerClient {

	public static void main(String[] args) {
		FileLogger logger = new FileLogger();
		// EncryptLogger : the context is not affected when changes such as adding, changing or removing an algorithme are made.
		// in addition making such changes will be simpler as each algorithm is contained in a separate class
		EncryptLogger eLogger = new EncryptLogger(logger);
		
		eLogger.log("log1.txt", "this message is to be encrypt and logged");
		EncryptionStrategy strategy = new SubstitutionCypherEncryption();
		eLogger.setCurrEncryptionStrategy(strategy);
		
		eLogger.log("log2.txt", "this message is to be encrypt and logged");
		strategy = new SimpleEncryption();
		eLogger.setCurrEncryptionStrategy(strategy);
		
		
		
		
	}

}
